<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------

use think\Route;

// 注册路由到index模块的Index控制器的index操作
Route::rule('/','index/Index/index');

// 注册路由到index模块的Employee控制器的index操作
Route::rule('employeeIndex','index/Employee/loadIndex'); // 加载首页模板
Route::rule('employeeLoad','index/Employee/loadIndexData'); // 加载首页数据
Route::rule('employeeViewQRCode','index/Employee/createQRCode');


Route::rule('employeeAdd','index/Employee/loadAdd'); // 加载添加员工页面
Route::rule('employeeSave','index/Employee/saveEmployee'); // 保存添加-修改员工

Route::rule('employeeUser','index/Employee/getUserData'); // 编辑-获得编辑用户的数据
Route::rule('employeeCheckNo','index/Employee/checkEmployeeNo'); // ajax检查员工ID得唯一性
Route::rule('employeeAddTrain','index/Employee/loadAddTrian'); // ajax检查员工ID得唯一性

Route::rule('employeeInfo','index/Employee/employeeInfo'); // 扫二维码查看员工认证信息

Route::rule('employeeSaveTrain','index/Employee/saveUserTrain'); // 扫二维码查看员工认证信息
Route::rule('employeeTrainInfo','index/Employee/getTrainInfo'); // 扫二维码查看员工认证信息

Route::rule('employeeEdit','index/Employee/edit');
Route::rule('employeeDel','index/Employee/del');


// 注册路由到index模块的Employee控制器的loadImport操作
Route::rule('excelIndex','index/Excel/loadIndex');
Route::rule('excelIndexLoad','index/Excel/indexLoad'); // 加载页面数据
Route::rule('excelUpload','index/Excel/uploadExcel'); // 上传Excel文件
Route::rule('excelSave','index/Excel/save'); // 保存上传文件表单数据
Route::rule('excelImport','index/Excel/import'); // 上传文件页面
Route::rule('excelDo','index/Excel/doIt'); // 上传文件页面

Route::rule('cron','index/Excel/cronAddExcelFile'); // 上传文件页面





/* return [
    '__pattern__' => [
        'name' => '\w+',
    ],
    '[hello]'     => [
        ':id'   => ['index/hello', ['method' => 'get'], ['id' => '\d+']],
        ':name' => ['index/hello', ['method' => 'post']],
    ],

]; */
